<?php
/**
 * Created by PhpStorm.
 * User: sunshubo
 * Date: 2017/12/20
 * Time: 17:47
 */

class UpdateActiveInfo_model extends MY_Model
{
    function update_info($body)
    {
        $type = $body->type;
        $aid = $body->aid;
        $table = 'ws_active_list';
        $where = array('id' => $aid);
        if ($type === 'look') {
            $this->my_update($table, $where, 'look_total', 'look_total+1', false);
        } elseif ($type === 'share') {
            $this->my_update($table, $where, 'share_total', 'share_total+1', false);
        }
    }
}